package com.qf.controller;

import com.qf.pojo.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author mkr
 * @version V1.0
 * @Project java2203-mkr
 * @Package com.qf.controller
 * @Description:
 * @Date 2022/6/30 16:07
 */
@RestController
public class HelloController {

    @Resource(name = "user1")
    private User user;

    @Value("${alibaba.ip}")
    private String ip;

    @Value("${alibaba.username}")
    private String username;

    @Value("${alibaba.password}")
    private String password;

    @RequestMapping("/hello")
    public String hello(){
        System.out.println("=========="+ip);
        System.out.println("=========="+username);
        System.out.println("=========="+password);
        System.out.println("=========="+user);
        return "欢迎使用springboot!";
    }
}
